package com.gxa.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 房产 实体类
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class House {
    private Integer hid; // 主键
    private String propertyId; // 房产编号
    private Integer houseNum; // 房间号
    private Integer count; // 房间个数
    @JSONField(format="yyyy-MM-dd")
    private Date liveTime; // 入住时间
    private Community community; // 小区
    private Build build;  // 栋数
    private Owner owner; // 业主

    public House(String propertyId, Integer houseNum, Integer count, Date liveTime, Community community, Build build, Owner owner) {
        this.propertyId = propertyId;
        this.houseNum = houseNum;
        this.count = count;
        this.liveTime = liveTime;
        this.community = community;
        this.build = build;
        this.owner = owner;
    }
}
